<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 原数组
      const input = ["生煎", "灌汤包", "水饺", "汉堡"]

      // 请把数组转换为以下格式：
      function fn(a,b,c,d){
      const output = [
        {
          label: a,
          value: a,
        },
        {
          label: b,
          value: b,
        },
        {
          label: c,
          value:c,
        },
        {
          label: d,
          value: d,
        },
      ]
      console.log(output);
    }
    fn("生煎","灌汤包","水饺","汉堡")
    </script>
  </body>
</html>
